/* eslint-disable */
import echarts from "echarts";
import {
  getOption1,
  getOption2_1,
  getOption2_2,
  getOption2_3,
  getOption3_1,
  getOption3_2,
  getOption4
} from "./getOption";
export default {
  data() {
    return {
      deviceList: [{}, {}, {}, {}, {}, {}],
      tableData: [
        {
          field1: 1,
          field2: "2222",
          field3: "33333",
          field4: 0.45
        },
        {
          field1: 2,
          field2: "2222",
          field3: "33333",
          field4: 0.55
        },
        {
          field1: 3,
          field2: "2222",
          field3: "33333",
          field4: 0.88
        }
      ],
      tableData2: [
        {
          field1: "京东",
          field2: "2222",
          field3: "33333"
        },
        {
          field1: "苏宁",
          field2: "2222",
          field3: "33333"
        },
        {
          field1: "自营",
          field2: "2222",
          field3: "33333"
        }
      ],
      channel: '0',
      time: ''
    };
  },

  mounted() {
    this.initEcharts();
  },
  methods: {
    initEcharts() {
      let echart1 = echarts.init(this.$refs.echartDiv1);
      echart1.setOption(getOption1());

      let echart2_1 = echarts.init(this.$refs.echartDiv2_1);
      echart2_1.setOption(getOption2_1());

      let echart2_2 = echarts.init(this.$refs.echartDiv2_2);
      echart2_2.setOption(getOption2_2());

      let echart2_3 = echarts.init(this.$refs.echartDiv2_3);
      echart2_3.setOption(getOption2_3());

      let echart3_1 = echarts.init(this.$refs.echartDiv3_1);
      echart3_1.setOption(getOption3_1());

      let echart3_2 = echarts.init(this.$refs.echartDiv3_2);
      echart3_2.setOption(getOption3_2());

      let option4_12 = getOption3_2();
      option4_12.xAxis.show = false
      option4_12.yAxis.show = false
      option4_12.grid.left = 0;
      option4_12.grid.top = 0;
      option4_12.grid.bottom = 0;
      let echart4_1 = echarts.init(this.$refs.echartDiv4_1);
      echart4_1.setOption(option4_12);

      let echart4_2 = echarts.init(this.$refs.echartDiv4_2);
      echart4_2.setOption(option4_12);

      let echart4_3 = echarts.init(this.$refs.echartDiv4_3);
      echart4_3.setOption(getOption4());

    }
  }
};
